#include <iostream>
#include <map>
#include <string>

using namespace std;

int main()
{
	map<string, int> word_cnt;
	string word;
	cout<<"enter some words:"<<endl;

	while(cin>>word)
	{
		++word_cnt[word];
	}

	cout<<"word\t\t"<<"times\t\t"<<endl;
	for(map<string, int>::iterator iter = word_cnt.begin();iter!=word_cnt.end();++iter)
	{
		cout<<(*iter).first<<"\t\t"<<(*iter).second<<endl;
	}
	return 0;
}